package com.jsnkj.basic.http

import com.jsnkj.basic.bean.AdSettingBaseEntity
import com.jsnkj.basic.bean.AdTypesEntity
import com.jsnkj.basic.bean.AdrewardsEntity
import com.jsnkj.basic.bean.BaseHttpEntity
import com.jsnkj.basic.bean.HomeItemBean
import com.jsnkj.basic.bean.IncomeExpenditureListEntity
import com.jsnkj.basic.bean.InviteCodeEntity
import com.jsnkj.basic.bean.PopularizeBillsEntity
import com.jsnkj.basic.bean.PopularizeCommissionsEntity
import com.jsnkj.basic.bean.PopularizeDisciplesEntity
import com.jsnkj.basic.bean.PopularizeInvitesEntity
import com.jsnkj.basic.bean.PopularizePurseEntity
import com.jsnkj.basic.bean.PopularizeSummaryEntity
import com.jsnkj.basic.bean.SettingEntity
import com.jsnkj.basic.bean.UserDataEntity
import com.jsnkj.basic.bean.UserEarningsEntity
import com.jsnkj.basic.bean.UserGroupCodeEntity
import com.jsnkj.basic.bean.UserLoginEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.POST

interface HttpApiService {
    /**
     *
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/settings")
    suspend fun postAppSetting(): BaseHttpEntity<SettingEntity?>

    /**
     * 获取广告类型
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/adtypes/list")
    suspend fun postAdTypesList(): BaseHttpEntity<ArrayList<AdTypesEntity>?>


    /**
     * 获取金币收入明细
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/wallet/incomes")
    suspend fun postWalletIncomes(): BaseHttpEntity<IncomeExpenditureListEntity?>


    /**
     * 获取金币支出明细
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/wallet/outcomes")
    suspend fun postWalletOutcomes(): BaseHttpEntity<IncomeExpenditureListEntity?>


    /**
     * 获取用户分享地址
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/user/invite-code?")
    suspend fun postUserInviteCode(): BaseHttpEntity<InviteCodeEntity?>


    /**
     * 获取广告配置
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/admodel/configs")
    suspend fun postAdModelConfigs(): BaseHttpEntity<AdSettingBaseEntity?>


    /**
     * 用户领取红包奖励
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/adrewards/receive")
    suspend fun postAdreWardsReceive(): BaseHttpEntity<Any?>

    /**
     *  上传明细
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/adrewards")
    suspend fun postAdreWards(@Body body: RequestBody): BaseHttpEntity<AdrewardsEntity?>

    /**
     * 用户登录(测试)
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/auth/login")
    suspend fun postAuthLogin(@Body body: RequestBody): BaseHttpEntity<UserDataEntity?>


    /**
     * 用户登录
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/oauth/login")
    suspend fun postOauthLogin(@Body body: RequestBody): BaseHttpEntity<UserDataEntity?>

    /**
     * 刷新用户信息
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/auth/userinfo")
    suspend fun postAuthUserInfo(): BaseHttpEntity<UserLoginEntity?>


    /**
     * 用户发起提现
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/withdrawal/getHuifubafangOauth")
    suspend fun getHuifubafangOauth(): BaseHttpEntity<com.jsnkj.basic.bean.HuifuOauthRepsBean?>

    /**
     * 用户发起提现
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/withdrawal/apply")
    suspend fun postWithdrawalApply(@Body body: RequestBody): BaseHttpEntity<Any?>

    /**
     * 获取用户佣金
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/user/earnings")
    suspend fun postUserEarnings(): BaseHttpEntity<UserEarningsEntity?>

    /**
     * 获取首页app列表数据
     *
     */
    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/app/list")
    suspend fun postAppList(): BaseHttpEntity<ArrayList<HomeItemBean>?>

    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/summary")
    suspend fun postPopularizeSummary(): BaseHttpEntity<PopularizeSummaryEntity?>


    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/purse")
    suspend fun postPopularizePurse(): BaseHttpEntity<PopularizePurseEntity?>

    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/disciples")
    suspend fun postPopularizeDisciples(): BaseHttpEntity<PopularizeDisciplesEntity?>


    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/commissions")
    suspend fun postPopularizeCommissions(): BaseHttpEntity<PopularizeCommissionsEntity?>



    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/bills")
    suspend fun postPopularizeBills(): BaseHttpEntity<PopularizeBillsEntity?>

    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/popularize/invites")
    suspend fun postPopularizeInvites(): BaseHttpEntity<PopularizeInvitesEntity?>


    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @GET("/api/user/group-code")
    suspend fun postUserGroupCode(): BaseHttpEntity<UserGroupCodeEntity?>

    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/group/prepay")
    suspend fun postGroupPrePay(): BaseHttpEntity<com.jsnkj.basic.bean.PayOrderEntity?>


    @Headers("Content-Type: application/json", "Accept-Language:zh-CN")
    @POST("/api/user/alinfo")
    suspend fun postUserAliInfo(@Body body: RequestBody): BaseHttpEntity<Any?>

}